import Layout from '@/layout/m'

export default [
  {
    path: '/m',
    component: Layout,
    hidden: true,
    redirect: '/m/home',
    children: [
      {
        path: 'home',
        name: 'MIndex',
        component: (resolve) => require(['@/m-views/index'], resolve),
        meta: {
          title: '首页',
          keepAlive: false,
        }
      },
      {
        path: 'custom',
        name: 'MCustomer',
        component: (resolve) => require(['@/m-views/customer'], resolve),
        meta: {
          title: '客户',
          keepAlive: false,
        }
      },
      {
        path: 'product',
        name: 'MProduct',
        component: (resolve) => require(['@/m-views/product'], resolve),
        meta: {
          title: '产品',
          keepAlive: false,
        }
      },
      {
        path: 'message',
        name: 'MMessage',
        component: (resolve) => require(['@/m-views/message'], resolve),
        meta: { title: '消息', keepAlive: false }
      },
      {
        path: 'my',
        name: 'MMy',
        component: (resolve) => require(['@/m-views/my'], resolve),
        meta: { title: '我的', keepAlive: false }
      },
    ]
  },
  // 客户管理内页
  {
    path: '/m/customer/add',
    component: (resolve) => require(['@/m-views/customer/add.vue'], resolve),
    name: 'MCustomerAdd',
    hidden: true,
    meta: { title: '创建客户', keepAlive: false }
  },
  {
    path: '/m/customer/detail',
    component: (resolve) => require(['@/m-views/customer/detail.vue'], resolve),
    hidden: true,
    name: 'MCustomerDetail',
    meta: { title: '客户详情', keepAlive: false }
  },
  // 产品管理内页
  {
    path: '/m/product/detail',
    component: (resolve) => require(['@/m-views/product/detail.vue'], resolve),
    name: 'MProductDetail',
    hidden: true,
    meta: { title: '产品详情', keepAlive: false }
  },
  // 我的-详情
  {
    path: '/m/my/detail',
    component: (resolve) => require(['@/m-views/my/detail.vue'], resolve),
    name: 'MMyDetail',
    hidden: true,
    meta: { title: '个人信息', keepAlive: false }
  },
  // 消息-详情
  {
    path: '/m/message/detail',
    component: (resolve) => require(['@/m-views/message/detail.vue'], resolve),
    name: 'MMessageDetail',
    hidden: true,
    meta: { title: '个人信息', keepAlive: false }
  }
];